package el;

import com.such.kit.el.support.ELFunction;
import com.such.kit.validate.ValidateCommons;
import com.such.kit.validate.ValidateNumber;

public class Function {

	@ELFunction
	public static String replace(String value, String regex, String replacement) {
		if (ValidateCommons.isNotEmpty(value)) {
			value = value.replaceAll(regex, replacement);
		}
		return value;
	}

	@ELFunction
	public static boolean eq(double value1, double value2) {
		return ValidateNumber.eq(value1, value2);
	}

}
